﻿using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using DevExpress.XtraReports.UI;

namespace DevEx.Thanh.reports
{
    public partial class rptBienBanKiemKe : DevExpress.XtraReports.UI.XtraReport
    {
        public rptBienBanKiemKe()
        {
            InitializeComponent();

        }
        private static void NumCellBeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e)
        {
            var currentCell = sender as XRTableCell;
            if (currentCell == null) return;
                    
            currentCell.Visible = !currentCell.Text.Equals("0");
        }
        //private void RegisterEvents()
        //{
        //    colCCL1.BeforePrint += NumCellBeforePrint;
        //    colCCL2.BeforePrint += NumCellBeforePrint;
        //    colCCL3a.BeforePrint += NumCellBeforePrint;
        //    colCCL3b.BeforePrint += NumCellBeforePrint;
        //    colTang.BeforePrint += NumCellBeforePrint;
        //    colGiam.BeforePrint += NumCellBeforePrint;
        //    colThua.BeforePrint += NumCellBeforePrint;
        //    colThieu.BeforePrint += NumCellBeforePrint;
        //    colKhoBo.BeforePrint += NumCellBeforePrint;
        //    colKhoDV.BeforePrint += NumCellBeforePrint;
        //    colCSSX.BeforePrint += NumCellBeforePrint;
        //    colDieuDi.BeforePrint += NumCellBeforePrint;
        //    colThanhLy.BeforePrint += NumCellBeforePrint;
        //}

        private void colTang_BeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e)
        {
            NumCellBeforePrint(sender, e);
        }

    }
}
